package com.zombie.effect;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.math.Interpolation;
import com.badlogic.gdx.math.Vector2;
import com.zombie.Constants;
import com.zombie.state.GameState;

public class ScoreEffect extends AbstractEffect{

	public int count = 1;
	public Color color = Color.RED.cpy();
	
	public ScoreEffect(){
		setFullLifeTime(3000);
		position = new Vector2(50,500);
		renderGroup = Constants.GROUP_LAST;
	}
	
	@Override
	public void update(int delta) {
		setLifeTime(getLifeTime()-delta);
		position.y+=0.5f;
		color.a-=0.01f;
	}

	@Override
	public void remove() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void draw(SpriteBatch batch, ShapeRenderer shapeBatch) {
		Color old = batch.getColor();
		batch.setColor(color);
		GameState.getInstance().font.draw(batch, "+"+count, position.x, position.y);
		batch.setColor(old);
	}

}
